interface Battle {
    id: string,
    atk: AtkInfo,
    def: DefInfo,
    start: string,
    end: string,
    timeLine: Array<string>,
    log: Array<string>,
    lostPlant: Array<any>,
    lostSun: number,
    result: string,
    simulation: number,
    battleDuration: string,
}

type AtkInfo = {
    name: string,
    zombieList: Array<any>,
    info: string,
    id: string,
}

type DefInfo = {
    name: string,
    plantList: Array<any>,
    info: string,
    id: string,
}

type Sacrifice = {
    battle: number,
    base: number,
    tombstone: number,
}

interface Tombstone {
    isUnlock: boolean, // 是否已解锁墓碑玩法
    zombie: Array<wakeUpZombieType>, // 现在拥有的僵尸列表
    zombieMax: number, // 拥有僵尸最大数量
    level: number, // 墓碑等级
    cdEnd: string, // 冷却结束时间
    wakeUpTime: string, // 唤醒完成时间
    wakeUpZombie: Array<wakeUpZombieType>, // 正在唤醒的僵尸列表
    wakeUpZombieMax: number, // 同时唤醒的僵尸最大数量
    undeadEssence: number, // 不死精华
    sacrifice: Sacrifice, // 献祭路线
    isChanged: boolean, // 是否需要更新数据库 临时字段
}

type wakeUpZombieType = {
    name: string,
    id: string,
    num: number,
    dangerLevel: number,
}

type rewardItem = {
    name: string,
    type: string,
    num: number,
}

type taskItem = {
    name: string,
    desc: string,
    reward: Array<rewardItem>,
    isDone: boolean, // 是否已完成
    doneTime: string, // 完成时间
    id: number,
    type: string, // 每日任务
}

interface Task {
    everyDayTask: Array<taskItem>,
    achievementTaskList: Array<taskItem>,
}

// 导出Battle类型
export type { Battle, Tombstone, Task };

